Skip to content

doc: clarify that features cannot be both experimental and deprecated#62456

Open
aduh95 wants to merge 2 commits intonodejs:mainfrom
aduh95:experimental-to-deprecated
Open

doc: clarify that features cannot be both experimental and deprecated#62456
aduh95 wants to merge 2 commits intonodejs:mainfrom
aduh95:experimental-to-deprecated

Conversation

@aduh95
Copy link
Copy Markdown
Contributor

@aduh95 aduh95 commented Mar 27, 2026

As discussed in the TSC meeting. The rationale is that either an experimental feature can be called experimental only if breaking changes (incl removal) would not break the ecosystem; if removing an experimental feature must go through a deprecation cycle, it is de facto no-longer experimental.

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/userland-migrations

@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label Mar 27, 2026
@JakobJingleheimer
Copy link
Copy Markdown
Member

Shouldn't there be some way to provide advanced warning?

@aduh95
Copy link
Copy Markdown
Contributor Author

aduh95 commented Mar 27, 2026

Shouldn't there be some way to provide advanced warning?

wdym? Do you have a scenario in mind?

* An improved alternative API is available.
* Breaking changes to the API are expected in a future major release.

Deprecated features are subject to [semantic versioning][] rules.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is the case for the undocumented features being deprecated.

>
> Experimental features leave the experimental status typically either by
> graduating to stable, or are removed without a deprecation cycle.
> graduating to stable, by being deprecated, or are removed without a deprecation cycle.
Copy link
Copy Markdown
Member

@joyeecheung joyeecheung Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarifying question: does this mean #62395 (comment) can land because it's doing exactly the newly added exit condition? That is the transition of stability index can be:

  1. 1 -> 2: stable
  2. 1 -> 0: deprecated
  3. 1 -> (black hole?): removed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tried to clarify in 44572ae, PTAL

@JakobJingleheimer
Copy link
Copy Markdown
Member

module.register() (#62395). Isn't that what precipitated this?

@joyeecheung
Copy link
Copy Markdown
Member

Changes in doc/api/documentation.md LGTM but I think changes in doc/api/deprecations.md is a separate claim - we don't necessarily follow it for undocumented features, or I think in terms of the relationship between deprecations and semver it's always evaluated on a case-by-case basis depending on potential breakage, doesn't feel right to blanket claim it's always tied to semver...can you move that to a separate PR?

@aduh95
Copy link
Copy Markdown
Contributor Author

aduh95 commented Mar 28, 2026

I don't think undocumented features are much different from experimental ones, we don't bother going through a deprecation cycle for those – or when we do, we're putting it back into semver as we sorta guarantee it won't be removed until the end of the deprecation cycle. I'm failing to see the nuance where we can get away with a breaking change to an API yet we would deprecate it.

can you move that to a separate PR?

I'd rather not, IMO it only makes sense to land both or none.

Copy link
Copy Markdown
Member

@JakobJingleheimer JakobJingleheimer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I generally agree with this, but guidance or specific solution (eg Joyee's suggestion of "pending removal") is needed to clarify how to handle what we would otherwise call deprecation of an experimental feature. I'm not saying we need a deprecation cycle, but we need some avenue available that allows us to gently inform users (a runtime deprecation is not that).

As-is, this handcuffs a considerate user experience with what feels like "not my problem". I'm not saying that's your intention, but it does leave us wondering "well, what do we do now…".

Copy link
Copy Markdown
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately we had a few experimental feature that have been kept going forever and they are widely adopted because they are the only way to do things. (async_hooks, looking at you, but also others).

This is change would be correct in principle, but it would require us to revise what we have as experimental, and move what we cannot safely remove to stable (again, looking at you, async_hooks).

@aduh95
Copy link
Copy Markdown
Contributor Author

aduh95 commented Mar 29, 2026

@JakobJingleheimer @mcollina you guys approved #62395 but are blocking this PR. That seems paradoxical, the goal of this PR was to enable #62395, so I don't follow the reasoning. Is it that you think #62395 should be an exception outside of the documented process, or you disagree with the interpretation that is made in this PR?

Regarding async_hooks, I don't agree with your analysis, we're unlikely to deprecate/remove the whole of async_hooks any time soon; if we have to remove a subset of it (with non-zero user-adoption), this PR says we can deprecate that subset and avoid breaking it until it's completely removed, which AFAIK is already the status quo.

Regarding adding a new "sub-status" for experimental features pending removal, I'm certainly not against it (I'm the one who suggested it in #62395 (comment)); that being said, in the TSC meeting, deprecation seemed to be preferred, or at least that's what the discussion revolved around. That PR somewhat removes the need for that "pending removal" status, though does not conflicts with it, if someone wants to work on that.

@JakobJingleheimer
Copy link
Copy Markdown
Member

It sounds to me like this is saying things now go from experimental directly to runtime deprecation with no "gentle" step in between. My objection is the missing middle step (where appropriate).

Or do I just not understand what the new language is saying?

I'm certainly not against it (I'm the one who suggested it in #62395 (comment))

Ack, sorry to misremember/misattribute.

@aduh95
Copy link
Copy Markdown
Contributor Author

aduh95 commented Mar 29, 2026

It sounds to me like this is saying things now go from experimental directly to runtime deprecation with no "gentle" step in between.

Hum this says nothing about runtime deprecation, only deprecation (which typically starts as doc-only).

@GeoffreyBooth
Copy link
Copy Markdown
Member

As far as I can tell the only change in policy that this PR makes is that once something is deprecated, any further changes need to follow semver. I think part of the confusion is around what the implications are of that change, which aren’t spelled out. For example:

  1. Once something is doc-deprecated, is going to runtime deprecation a semver-major change?
  2. Once something is doc- or runtime-deprecated, is removal a semver-major change?

I don’t know from reading this PR what the answers are to these questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Issues and PRs related to the documentations.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants